package study.spring.secondDay;

import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.context.ApplicationContext;

public class BeansInheritMainApp {

	public static void main(String[] args) {
		
		ApplicationContext context = new ClassPathXmlApplicationContext("beansInherit.xml");
		
		BeansInherit objA = (BeansInherit) context.getBean("BeansInherit");
		
		objA.getMessage1();
		objA.getMessage2();
		
		SubclassOfBeansInherit objB = (SubclassOfBeansInherit) context.getBean("SubclassOfBeansInherit");
		
		objB.getMessage1();
		objB.getMessage2();
		objB.getMessage3();
	}
	
	public BeansInheritMainApp() {
		// TODO Auto-generated constructor stub
	}

}
